package com.freejy.ecommunity.service;



import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.freejy.ecommunity.mapper.TopicReplyMapper;
import com.freejy.ecommunity.model.TopicReply;

@Service
public class TopicReplyService {

    private final Logger log = LoggerFactory.getLogger(TopicReplyService.class);

    @Autowired
    private TopicReplyMapper topicReplyMapper;


    /**
     * 根据帖子id获取回复信息
     * @return
     */
    public List<TopicReply> getTopicReplysByTopicId(int topicId, Integer size, Integer limit) {
        return topicReplyMapper.getTopicReplysByTopicId(topicId, size, limit);
    }
    /**
     * 新增帖子
     * @return
     */
    public  int insert( TopicReply topicReply){
        return topicReplyMapper.insert(topicReply);
    }


}
